Release 10.1A: OpenEdge Development:
Internationalizing Applications


Using UTF-16 in the ASC and CHR functions

To use UTF-16 in the ASC function, use the following syntax:

Syntax
ASC( ch, "UTF-16" [, source-cp ] ) 

ch

One character, like 'A', "A", or '~U034e'.

source-cp

The name of the source code page.

This returns one of the following values, which are platform independent:

To use UTF-16 in the CHR function, use the following syntax:

Syntax
CHR( n, target-cp, "UTF-16" ) 

n

The numeric value of the character.

target-cp

The name of the target code page.

This command interprets its input as one of the following platform-independent values:

When using UTF-16 in CODEPAGE-CONVERT, the behavior of character strings as UTF-16 are sensitive to byte order and the presence of null bytes. The 4GL can handle UTF-16 strings as RAW or MEMPTR data, and the use of PUT-UNSIGNED-SHORT and GET-UNSIGNED-SHORT solves any byte order machine dependencies.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095